package cn.jd.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.jd.dao.AccountDao;
import cn.jd.pojo.Account;
import cn.jd.service.IAccountService;
@Service//把AccountService纳入spring容器进行管理
public class AccountService implements IAccountService {
	@Autowired//spring自动注入bean对象
	private AccountDao accountDao;

	@Override
	public Account accountLogin(Account account) {
		// TODO Auto-generated method stub
		return accountDao.selectAccount(account );
	}
	 @Override
    public int addOne(Account account) {
       return accountDao.addOne(account);
 
    }
    @Override
    public Account checkReg(String userName) {
        return accountDao.checkReg(userName);
    }
	
}